//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CrmCardHolder, CrmCardHolderResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCrmCardHolderList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CrmCardHolderResponse>(`/uctoo/crm_card_holder/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCrmCardHolder = async (id: string) => {
  return requestClient.get<CrmCardHolder>(`/uctoo/crm_card_holder/${id}`);
};

export const adductooCrmCardHolder = async (data: Partial<CrmCardHolder>) => {
  return requestClient.post<CrmCardHolder>('/uctoo/crm_card_holder/add', data);
};

export const edituctooCrmCardHolder = async (data: Partial<CrmCardHolder>) => {
  return requestClient.post<CrmCardHolder>('/uctoo/crm_card_holder/edit', data);
};

export const deleteuctooCrmCardHolder = async (id: string) => {
  return requestClient.post<any>('/uctoo/crm_card_holder/del', { id });
};
